package com.xtkj.superclub_entity.entity.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xtkj.commons.JsonParse;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @author lizheqi
 * @create 2019-12-23-19:40
 */
@Data
@Accessors(chain = true)
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "c_user")
public class User implements Serializable {

    @TableId(value = "user_id",type = IdType.INPUT)
    private String userId;//用户编号
    private String personalAlbumId;//个人相册编号
    private String nickName;//昵称
    private String sex;//性别
    private String telephone;//手机号
    private String password;//密码
    private int isLimit;//是否限制登录
    private String headPortrait;//头像
    private int age;//年龄
    private String personalizedSignature;//个性签名
    private String hobby;//爱好
    private String post;//职业
    private String hometown;//家乡
    private String city;//所在城市
    private int integral;//个人积分
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createdtm;//创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updatedtm;//修改时间

    @Override
    public String toString() {
        return JsonParse.obj2String(this);
    }
}
